Skip to content

test: Use temporary to deal with temp files #640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2025
Merged

Conversation

Lysxia
Copy link
Contributor

@Lysxia Lysxia commented Jun 16, 2025

To avoid flooding the current directory with temp files when testing.

@Bodigrim
Copy link
Contributor

@Lysxia
Copy link
Contributor Author

Lysxia commented Jun 16, 2025

The CPS-style of this function doesn't work for benchmarks which manipulate the file-closing actions as first-class values but I can use directory to get the system's tmp dir.

@Bodigrim
Copy link
Contributor

There is also https://hackage.haskell.org/package/temporary-1.3/docs/System-IO-Temp.html#v:emptySystemTempFile if it suits better.

@Lysxia Lysxia changed the title test: Move temp directory into dist-newstyle/tmp instead of . test: Use temporary to deal with temp files Jun 17, 2025
@Lysxia Lysxia force-pushed the test-tmp-dir branch 2 times, most recently from 2022cbf to 94111ea Compare June 17, 2025 06:52
@Bodigrim
Copy link
Contributor

install: |
apt-get update -y
apt-get install -y curl ghc libghc-tasty-quickcheck-dev libghc-tasty-hunit-dev

Presumably this now needs also libghc-temporary-dev.

The previous implementation was dumping temp files in the current directory
Copy link
Contributor

@Bodigrim Bodigrim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. No idea what's up with OpenBSD job, but it's been broken for ages. Feel free to go ahead and merge this and the rest of approved PRs.

@Bodigrim Bodigrim merged commit ddd22b7 into master Jun 21, 2025
48 of 49 checks passed
@Bodigrim Bodigrim deleted the test-tmp-dir branch June 21, 2025 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants